package com.cn.yugan.Widget.Webview;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.webkit.JavascriptInterface;

import com.cn.yugan.Activity.ShowWebImageActivity;

import java.lang.annotation.Annotation;

/**
 * Created by Rover on 2016/10/12 .
 * Email 357319517@qq.com
 */

public class JSInterface {
    
    private Context context;

    public JSInterface(Context context) {
        this.context = context;
    }

    @JavascriptInterface
    public void openImage(String img){
        Intent intent = new Intent();
        intent.putExtra("image",img);
        intent.setClass(context,ShowWebImageActivity.class);
        context.startActivity(intent);
    }
    
}
